from rest_framework import serializers

from goods.models import GoodsVisitCount


# 定义商品列表序列化器类
class GoodsVisitSerializer(serializers.ModelSerializer):

    category = serializers.CharField(label='商品列表')

    class Meta:

        model = GoodsVisitCount
        fields = ('id', 'category', 'count', 'date')

